package com.study.flink.entity;

import java.util.List;

import lombok.Data;

/**
 * 一些餐厅的信息，数据原型如下：
 * url,address,name,online_order,book_table,rate,votes,phone,location,rest_type,dish_liked,cuisines,approx_cost(for
 * two people),reviews_list,menu_item,listed_in(type),listed_in(city)
 * 
 * @projectName: flink-demo
 * @author: yandong
 * @description:
 * @date: 2019年7月4日 下午8:07:54
 * @version:
 */
@Data
public class Zomato {
    /**
     * zomato网站上餐厅的网址
     */
    private String url; // https://www.zomato.com/bangalore/jalsa-banashankari?context=eyJzZSI6eyJlIjpbNTg
    /**
     * 餐厅在班加罗尔的地址
     */
    private String address; // "942, 21st Main Road, 2nd Stage, Banashankari, Bangalore"
    /**
     * 餐厅名称
     */
    private String name; // Jalsa
    /**
     * 餐厅提供在线订购
     */
    private Boolean onlineOrder; // Yes
    /**
     * 是否提供餐桌选项
     */
    private Boolean bookTable; // No
    /**
     * 餐厅的评级，最高为5
     */
    private double rate; // 4.1/5
    /**
     * 餐厅获得评论的总数
     */
    private int votes; // 787
    /**
     * 餐厅的电话
     */
    private String phone; // 080 41714161
    /**
     * 餐厅所在的社区
     */
    private String location; // Banashankari
    /**
     * 餐厅类型
     */
    private String restType; // Casual Dining
    /**
     * 人们喜欢在餐厅吃的菜肴。 源数据中以逗号分隔。
     */
    private String dishLiked; // Momos, Lunch Buffet, Chocolate Nirvana, Thai Green Curry, Paneer
                               // Tikka, Dum Biryani, Chicken Biryani
    /**
     * 食物风格。 源数据中是以逗号分隔
     */
    private List<String> cuisines; // Chinese, North Indian, Thai
    /**
     * 两个人用餐的大致费用
     */
    // for two people
    private int approxCost; // 800
    // the example is : [('Rated 4.0', 'RATED\n Had been here for dinner with family. Turned out to
    // be a good
    // choose suitable for all ages of people. Can try this place. We liked the most was their
    // starters. Service is good. Prices are affordable. Will recommend this restaurant for early
    // dinner. The place is little noisy.'), ('Rated 3.0', 'RATED\n The ambience is really nice,
    // staff is courteous. The price is pretty high for the quantity, but overall the experience was
    // fine. The quality of food is nice but nothing extraordinary. They also have buffet(only
    // veg)'), ...]
    private List<Review> reviewsList;
    /**
     * 餐厅的菜单
     */
    private List<String> menuItem; // []
    /**
     * 用餐类型
     */
    private String listedInType; // Buffet
    /**
     * 餐厅所在的社区
     */
    private String listedInCity; // Banashankari

    @Data
    public static class Review {
        /**
         * 评级，满分 5.0
         */
        private double rate;
        /**
         * 顾客评论
         */
        private String review;
    }

    @Deprecated
    public void format(String line) {
        throw new RuntimeException("该方法还没有写好");
    }
}
